<?php
namespace app\shop\route;
use app\shop\validate\Contract;
use think\facade\Route;
use app\shop\middleware\Auth;
Route::group("contract", function () {         //团队风采
    Route::group("tpl", function () {
        Route::get('list', 'contract.Contract/tplList');        //列表
        Route::post('add', 'contract.Contract/addTpl')->validate(Contract::class, 'addTpl');        //编辑员工
        Route::put('edit', 'contract.Contract/editTpl')->validate(Contract::class, 'editTpl');        //编辑员工
        Route::delete(':id', 'contract.Contract/deleteTpl')->validate(Contract::class, 'info');    //删除
        Route::get(':id', 'contract.Contract/tplForm')->validate(Contract::class, 'info');    //信息表单
    });
    Route::get('list', 'contract.Contract/list');        //列表
    Route::post('add', 'contract.Contract/add')->validate(Contract::class, 'add');        //编辑员工
    Route::put('edit', 'contract.Contract/edit')->validate(Contract::class, 'edit');        //编辑员工
    Route::delete(':id', 'contract.Contract/delete')->validate(Contract::class, 'info');    //删除
    Route::get(':id', 'contract.Contract/info')->validate(Contract::class, 'info');    //信息表单
    Route::get('pdf', 'contract.Contract/pdf')->validate(Contract::class, 'info');        //编辑员工
    Route::post('sign', 'contract.Contract/sign')->validate(Contract::class, 'sign');        //编辑员工
})->allowCrossDomain()->middleware([Auth::class]);